package cn.adkii.springframework.test.bean;

import cn.adkii.springframework.beans.BeansException;
import cn.adkii.springframework.beans.factory.*;
import cn.adkii.springframework.context.ApplicationContext;
import cn.adkii.springframework.context.ApplicationContextAware;
import org.omg.CORBA.TRANSACTION_MODE;

import java.util.Random;

/**
 * @author malingdi
 * @description
 * @date 2023/11/23 15:58
 */
public class UserService implements IUserService{

    @Override
    public String queryInfo() {
        try {
            Thread.sleep(new Random(1).nextInt(100));
        }catch (InterruptedException e){
            e.printStackTrace();
        }
        return "小马，100001， 北京";
    }

    @Override
    public String register(String userName) {
        try {
            Thread.sleep(new Random(1).nextInt(100));
        }catch (InterruptedException e){
            e.printStackTrace();
        }
        return "注册用户：" + userName + " success!";
    }
}
